{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "0bd319c7",
   "metadata": {},
   "source": [
    "# 2021大二第一学期课程表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "2b0ea993",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "【上课提醒】\n",
      "星期四\n",
      "上午\n",
      "课程名称：近现代中外政治与文化交流【黄家瑜】\n",
      "课程时间：10：35-12：00\n",
      "上课地点：9-307\n",
      "-------------------------\n",
      "下午\n",
      "课程名称：广告文案写作【罗希】\n",
      "课程时间：14：30-15：55\n",
      "上课地点：1-303\n",
      "-------------------------\n",
      "晚上\n",
      "课程名称：大英【王金妮】\n",
      "课程时间：18：45-20：10\n",
      "上课地点：10-302\n"
     ]
    }
   ],
   "source": [
    "# 利用datetime模块与if语句（模仿微信上课提醒小程序）做一个上课提醒工具\n",
    "\n",
    "# 调用模块\n",
    "# datetime 里面的datetime的方法，可以取出年月日时分秒毫秒微秒\n",
    "# int() 函数用于将一个字符串或数字转换为整型\n",
    "# 使用变量赋予\n",
    "import datetime\n",
    "time = datetime.datetime.today().weekday()\n",
    "week_time = int(time)\n",
    "\n",
    "# 使用 if 可以判断条件，使用else可以处理条件不成立的情况;如果希望再增加一些条件，条件不同，需要执行的代码也不同时，就可以使用 elif\n",
    "# 如果想遍历到你的判断条件就不再执行其他判断条件分支语句，那么就用elif（到符合查询条件的语句后，后面所有的elif和else就不会再被执行）\n",
    "if week_time == 0:\n",
    "    print(\"【上课提醒】\");print(\"星期一\");\n",
    "    print(\"上午\")\n",
    "    print(\"课程名称：创业基础（实践）【廖汉腾】\");print(\"课程时间：09：45-12：00\");print(\"上课地点：1-401\")\n",
    "    print(\"-\"*25)\n",
    "    print(\"下午\")\n",
    "    print(\"课程名称：python语言【许智超】\");print(\"课程时间：14：30-16：50\");print(\"上课地点：2实203\")\n",
    "elif week_time == 1:\n",
    "    print(\"【上课提醒】\");print(\"星期二\");\n",
    "    print(\"上午\")\n",
    "    print(\"课程名称：毛概（实践）【李婧】\");print(\"课程时间：8：00-9：30\");print(\"上课地点：9-207\")\n",
    "    print(\"-\"*25)\n",
    "    print(\"下午\")\n",
    "    print(\"课程名称：大英【王金妮】\");print(\"课程时间：16：10-17：35\");print(\"上课地点：10-302\")\n",
    "    print(\"-\"*25)\n",
    "    print(\"晚上\")\n",
    "    print(\"课程名称：非物质文化遗产赏析【唐剑宇】\");print(\"课程时间：20：15\");print(\"上课地点：4-206\")\n",
    "elif week_time == 2:\n",
    "    print(\"【上课提醒】\");print(\"星期三\")\n",
    "    print(\"上午\")\n",
    "    print(\"课程名称：无线电测向【梁嘉敏】\");print(\"课程时间：10：35-12：00\");print(\"上课地点：西区篮球场西面\")\n",
    "    print(\"-\"*25)\n",
    "    print(\"晚上\")\n",
    "    print(\"课程名称：毛概【李文】\");print(\"课程时间：18：45-20：55\");print(\"上课地点：7-401\")\n",
    "elif week_time == 3:\n",
    "    print(\"【上课提醒】\");print(\"星期四\")\n",
    "    print(\"上午\")\n",
    "    print(\"课程名称：近现代中外政治与文化交流【黄家瑜】\");print(\"课程时间：10：35-12：00\");print(\"上课地点：9-307\")\n",
    "    print(\"-\"*25)\n",
    "    print(\"下午\")\n",
    "    print(\"课程名称：广告文案写作【罗希】\");print(\"课程时间：14：30-15：55\");print(\"上课地点：1-303\")\n",
    "    print(\"-\"*25)\n",
    "    print(\"晚上\")\n",
    "    print(\"课程名称：大英【王金妮】\");print(\"课程时间：18：45-20：10\");print(\"上课地点：10-302\")\n",
    "elif week_time == 4:\n",
    "    print(\"【上课提醒】\");print(\"星期五\")\n",
    "    print(\"上午\")\n",
    "    print(\"课程名称：AI软件运用【阚凤霞】\");print(\"课程时间：8：00-9：30\");print(\"上课地点：新综612\")\n",
    "    print(\"课程名称：网站运营与管理【胡美香】\");print(\"课程时间:9：45-12：00\");print(\"上课地点：3实304\")\n",
    "elif week_time == 5:\n",
    "    print(\"听说是周末\");print(\"所以，还在看手机？作业写完了吗？\")\n",
    "elif week_time == 6:\n",
    "    print(\"听说假期快结束了\");print(\"开心点，毕竟明天才是星期一\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c422629f",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "15298547",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
